package qq2564874169.tuaotuao.fx.orm.mybatis;


import qq2564874169.tuaotuao.fx.orm.CursorReader;
import qq2564874169.tuaotuao.fx.orm.MultipleReader;
import qq2564874169.tuaotuao.fx.orm.SqlParam;
import qq2564874169.tuaotuao.fx.orm.query.MysqlQuery;
import qq2564874169.tuaotuao.fx.orm.query.PageData;
import qq2564874169.tuaotuao.fx.orm.query.PageSet;

import java.util.List;

public class MybatisMysqlQuery extends MysqlQuery implements MybatisDbQuery {
    private MybatisQuery query;

    public MybatisMysqlQuery(MybatisQuery query) {
        super(query);
        this.query = query;
    }

    @Override
    public <T> List<T> stmtQuery(Class<T> clazz, SqlParam param) {
        return query.stmtQuery(clazz, param);
    }

    @Override
    public MultipleReader stmtMultiple(SqlParam param) {
        return query.stmtMultiple(param);
    }

    @Override
    public <T> PageData<T> stmtPager(Class<T> clazz, PageSet pageSet, SqlParam param) {
        return query.stmtPager(clazz, pageSet, param);
    }

    @Override
    public <T> CursorReader<T> stmtCursor(Class<T> clazz, SqlParam param, int fetchSize, boolean independent) {
        return query.stmtCursor(clazz, param, fetchSize, independent);
    }
}
